﻿{extend name="public:base"}
{block name="title"}xCMS系统{/block}
{block name="head"}
	<script src="/ADJS/index.js"></script>
	<link rel="stylesheet" type="text/css" href="/ADCSS/index.css">	
{/block}
{block name="content"}
	 <div id="top" calss=""> 
    <span class="pull-left">
      <button class="layui-btn layui-btn-small layui-btn-primary yc">
        <i class="fa fa-list-ul"></i>
      </button>
    </span>
    <span class="pull-right">
      <button class="layui-btn layui-btn-small layui-btn-primary" onclick="
        location.href = '{:url('index/index')}'
      " title="刷新重新载入页面">
        重载
      </button>
      <button class="layui-btn layui-btn-small layui-btn-primary user">
        <i class="fa fa-address-card"></i> 
        <font>{$data.user}</font>
      </button>
      <div id="user_div">
        <div id="user_action">
          <div id="user_img">
            {if condition="$data.head_img"}
                <img src="/uploads/{$data.head_img}" alt="">
              {else/}
                <img src="/ADIMG/xcms.gif" alt="">
            {/if}
          </div> 
        </div>
        <hr style="margin-top:2px;margin-bottom:4px;">
        <div id="user_content">
          <div class="column">      
            <a href="{:url('user/index')}" class="layui-btn" >
              用户中心
            </a>
            <a href="{:url('user/user_log')}" class="layui-btn" >
              操作记录
            </a>            
          </div>
        </div>
      </div>      
      <a class="layui-btn layui-btn-small" href="{:url('index/out')}">安全退出</a>
    </span>
  </div>
  <div id="left_menu">
    <div id="up">
      <h1 id="title">xCMS</h1>
      <p id="user">管理员: {$data.user}</p>
      <ul class="layui-nav layui-nav-tree">
        <li class="layui-nav-item">
          <a href="javascript:;">用户</a>
          <dl class="layui-nav-child">
            <dd><a href="{:url('admin/index')}" >用户管理</a></dd>
            <dd><a href="{:url('admin/group')}" >用户组管理</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item">
          <a href="javascript:;">内容</a>
          <dl class="layui-nav-child">
            <dd><a href="{:url('Article/article_add')}">文章添加</a></dd>
            <dd><a href="{:url('category/index')}" >栏目管理</a></dd>
            <dd><a href="{:url('Article/index')}">文章管理</a></dd>          
          </dl>
        </li>
      </ul>
    </div>    
    <div id="down">
      <h4 class="text-center">Copyright 2017 </h4>
      <h4 class="text-center">by YeMiao</h4>
    </div>
  </div>
  <div id="top_menu">
    <div class="layui-tab layui-tab-brief" style="margin: 0;">
      <ul class="layui-tab-title" style="margin-bottom: 0;"> 
        <li class="layui-this" data="{:url('index/home')}">首页</li>
      </ul>
    </div>
  </div>
  <script>
    $(function(){
      // 处理后台传过来的url,进行url定位
      let to_url = '{$to_url}';      
      if(to_url != '' && to_url != '/admin/index/home.html'){
        if($("a[href='"+to_url+"']").length){
          $("a[href='"+to_url+"']").click();
        }else{
          let url = to_url.split('?');
          $("a[href='"+url[0]+"']").click();
          reload(to_url);
        }
      }
      $('.yc').click(function(){
        layui.use('layer',function(){
          let layer = layui.layer;
          layer.msg('其实我是个摆设！哎嘿嘿。');
        });
      });
    });
  </script>
{/block}
{block name="main"}
	<div id="main">
		
	</div>
{/block}